-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Added static types _libs/algos #33271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Added static types _libs/algos #33271
Conversation
@@ -261,7 +260,7 @@ def kth_smallest(numeric[:] a, Py_ssize_t k) -> numeric: | |||
|
|||
@cython.boundscheck(False) | |||
@cython.wraparound(False) | |||
def nancorr(const float64_t[:, :] mat, bint cov=0, minp=None): | |||
def nancorr(const float64_t[:, :] mat, bint cov=False, minp=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated C code for this was not changed
float64_t sum_ranks = 0 | ||
int tiebreak = 0 | ||
bint keep_na = 0 | ||
bint keep_na = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated C code for this was not changed
float64_t sum_ranks = 0 | ||
int tiebreak = 0 | ||
bint keep_na = 0 | ||
bint keep_na = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The generated C code for this was not changed
@@ -325,7 +324,7 @@ def nancorr(const float64_t[:, :] mat, bint cov=0, minp=None): | |||
|
|||
@cython.boundscheck(False) | |||
@cython.wraparound(False) | |||
def nancorr_spearman(const float64_t[:, :] mat, Py_ssize_t minp=1): | |||
def nancorr_spearman(const float64_t[:, :] mat, Py_ssize_t minp=1) -> ndarray: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does adding these return annotations to the def like this change anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for functions that arent cdef/cpdef its ornamental
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
thanks @MomIsBestFriend |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff